<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<title>查看会员</title>
<%@include file="../collect/meta.jsp"%>
<link rel="stylesheet" href="css/radius.css" type="text/css"></link>
<link rel="stylesheet" href="css/table.css" type="text/css"></link>
<link rel="stylesheet" href="css/btn-bottom.css" type="text/css"></link>
<script type="text/javascript" src="${ctx}/js/returnTop.js"></script>
</head>
<body lang="zh-cn">
	<div class="wrapper">
		<c:import url="/collect/top.jsp"></c:import>
		<div class="main-container" id="main-container">
			<div class="main-container-inner">
				<c:import url="/collect/left.jsp"></c:import>
				<div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<ul class="breadcrumb">
							<li><i class="icon-home home-icon"></i>会员管理</li>
							<li>查看会员</li>
						</ul>
						<!-- .breadcrumb -->
					</div>
					<div class="page-content">
						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->
								<form action="member!getOneMember" name="seekoneMember"
									method="post">
									<div class="alert alert-success">会员总数: ${memberCount}</div>
									<div id="btn-bottom">
										<input type="text"
											name="member.mobile" id="mobile" placeholder="手机号" />&nbsp;
										<input type="button" class="btn btn-primary radius btn-sm"
											value="搜索" id="oneMemberBtn">
									</div>
								</form>
								<table id="table_bug_report"
									class="table table-striped table-bordered table-hover">
									<tr>
										<th>手机号</th>
										<th>姓名</th>
										<th>会员余额</th>
										<th>会员积分</th>
										<th>会员等级</th>
										<th>注册时间</th>
									</tr>
									<c:forEach items="${baseMembers}" var="baseMember"
										varStatus="status">
										<tr>
											<td>
													<a href="member!watchMember?member.mobile=${baseMember.member.mobile }&index=${index }">${baseMember.member.mobile}</a>
											</td>
											<td>
													<c:choose>
														<c:when test="${not empty baseMember.member.name}">
									   			${baseMember.member.name }
									   		</c:when>
														<c:otherwise>
														</c:otherwise>
													</c:choose>
											</td>
											<td>${baseMember.balance}</td>
											<td>${fn:substring(baseMember.score,
													0, fn:indexOf(baseMember.score, ".0")) }</td>
											<td>${baseMember.level}</td>
											<td>${fn:substring(baseMember.member.createTime,
													0, fn:indexOf(baseMember.member.createTime, ".0")) }</td>
										</tr>
									</c:forEach>
								</table>
								<c:if test="${searchOneMember != 'searchOneMember' }">
									<div class="row" id="page">
										<ul class="pagination">
											<li><a href="member!getAllMember?index=1">首页</a></li>
											<li class="prev">
												<!--上一页--> <c:choose>
													<c:when test="${index == 1 }">
														<a href="member!getAllMember?index=1"><i
															class="icon-double-angle-left"></i> </a>
													</c:when>
													<c:otherwise>
														<a href="member!getAllMember?index=${index-1}"><i
															class="icon-double-angle-left"></i> </a>
													</c:otherwise>
												</c:choose>
											</li>
											<!-- <li>
										                <a href="smsLog!getList?index=${index-1}">上一页</a>
										            </li> -->
											<li><a href="javascript:void(0)">${index }</a></li>
											<!-- <li>
										                <a href="smsLog!getList?index=${index+1}">下一页</a>
										            </li> -->
											<li class="next">
												<!--下一页--> <c:choose>
													<c:when test="${index + 1 > page }">
														<a href="member!getAllMember?index=${page }"><i
															class="icon-double-angle-right"></i> </a>
													</c:when>
													<c:otherwise>
														<a href="member!getAllMember?index=${index+1}"><i
															class="icon-double-angle-right"></i> </a>
													</c:otherwise>
												</c:choose>
											</li>
											<li><a href="member!getAllMember?index=${page }">末页</a>
											</li>
											<li><a href="javascript:void(0)">共${page}页</a></li>
										</ul>
									</div>
								</c:if>
							</div>
							<!-- /.col -->
						</div>
						<!-- /.row -->
					</div>
					<!-- /.page-content -->
				</div>
				<!-- /.main-content -->
			</div>
			<!-- /.main-container-inner -->
			<a href="#" id="btn-scroll-up"
				class="btn-scroll-up btn btn-sm btn-inverse"
				style="position:fixed;bottom:0;"> <i
				class="icon-double-angle-up icon-only bigger-110"></i> </a>
		</div>
		<div class="push"></div>
	</div>
	<c:import url="/collect/down.jsp"></c:import>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#oneMemberBtn").click(function() {
				var mobile = $("#mobile").val();
				if (mobile.length != 0) {
					$("form[name='seekoneMember']").submit();
				}
			});
			//防收回；会员管理：$查看会员
			$('.membership > ul').show();
			$('.membership > ul > li > a').eq(0).css("color", "red");
		});
	</script>
</body>
</html>
